package com.clouds.wms.dao;

import java.util.List;

import com.clouds.wms.bean.Cmsmj;
import com.clouds.wms.exception.DatabaseException;
import com.clouds.wms.util.PagesBean;

public interface CmsmjDao {

	/**
	 * 根据单据类别编号查询单据类别
	 * @param mjaa 单据类别编号
	 * @return
	 * @throws DatabaseException
	 */
	public Cmsmj getCmsmjByMjaa(String mjaa) throws DatabaseException;
	
	/**
	 * 查找单据类别
	 * @param mjaa 单据类别编号
	 * @param mjab 单据类别名称
	 * @param mjac 单据类别性质
	 * @param mjae 单据类别状态
	 * @param offset
	 * @param pageSize
	 * @return
	 * @throws DatabaseException
	 */
	public PagesBean getCmsmjList(String mjaa, String mjab, int mjac, int mjae, int offset, int pageSize) throws DatabaseException;
	
	/**
	 * 保存单据类别
	 * @param cmsmj
	 * @return
	 * @throws DatabaseException
	 */
	public int saveCmsmj(Cmsmj cmsmj) throws DatabaseException;
	
	/**
	 * 更新单据类别
	 * @param cmsmj
	 * @return
	 * @throws DatabaseException
	 */
	public int updateCmsmj(Cmsmj cmsmj) throws DatabaseException;

	/**
	 * 删除单据类别
	 * @param mjaa 单据类别编号
	 * @return
	 * @throws DatabaseException
	 */
	public int deleteCmsmjByMjaa(String mjaa) throws DatabaseException;

	/**
	 * 获得所有单据类别
	 * @return
	 * @throws DatabaseException
	 */
	public List<Cmsmj> getAllCmsmjList() throws DatabaseException;
	
	/**
	 * 修改单据类别状态
	 * @param mjaa 单据类别编号
	 * @param mjae 状态
	 * @return
	 * @throws DatabaseException
	 */
	public int updateCmsmjStatus(String mjaa, int mjae) throws DatabaseException;
	
	/**
	 * 根据单据性质查找
	 * @param mjac 单据性质
	 * @return
	 * @throws DatabaseException
	 */
	public List<Cmsmj> getCmsmjListByMjac(int mjac) throws DatabaseException;
	
}
